<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../static/js/vue.min.js"></script>
</head>
<body>

<div id="test">
    {{msg}}
    {{name}}
    {{user.username}}
    {{user.age}}
    <p>{{msg}}</p>
    <p>{{name}}</p>
    <p>{{user.username}}</p>
    <p>{{user.age}}</p>

    <input type="button"  @click="hello()"  value="点击我">




</div>

<script>

    var vue=new Vue({
        el:"#test",
        data:{
            msg:"ddd",
            name:"lll",
            user:{"username":"zhangan","age":14}
        },
        methods:{
            hello() {
                alert("恭喜共享");
            }

        }



    });



</script>

</body>
</html>